<template>
  <div class="pageTitle">
    <div class="pTitle" :style="{ background: headerSetting.backgroundColor }">
      <div class="left" @click="goBack()">
        <!-- 以插槽形式对外开放，支持自定义。默认右边不展示 -->
        <slot name="header_left"><</slot>
      </div>
      <div class="center"><slot name="header_center"></slot></div>
      <div class="right">
        <!-- 以插槽形式对外开放，支持自定义。默认右边不展示 -->
        <slot name="header_right"></slot>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    headerSetting: {
      backgroundColor: "transparent", //背景色
      default: () => {
        return {
          backgroundColor: "transparent",
        };
      },
    },
  },
  methods: {
    goBack() {},
  },
};
</script>
<style scoped lang="less">
/* // 页面顶部header的样式文件 */

.pageTitle {
  z-index: 999;
  padding-top: 0;
  .pTitle {
    position: fixed;
    left: 0;
    top: 1.1rem;
    z-index: 9;
    color: rgb(51, 51, 51);
    font-size: 0.32rem;
    word-break: break-all;
    width: 100%;
    background: transparent;
    height: 0.88rem;
    line-height: 0.88rem;
    border-bottom: 0.5px solid #ddd;
    display: flex;
    &.noBorder {
      border: none;
    }

    .left {
      width: 1.38rem;
      height: 0.88rem;
      line-height: 0.88rem;
      text-align: center;
      & > .icon_fanhui3x {
        font-size: 0.88rem;
        font-weight: 1;
        margin-left: -0.2rem;
        width: 1.38rem;
        display: block;
        text-align: center;
      }
    }

    .center {
      color: #272727;
      text-align: center;
      flex: 1;
    }
    /* //单行省略号 */
    .ellipsis {
      overflow: hidden;
      white-space: nowrap;
      text-overflow: ellipsis;
    }

    .right {
      width: 2rem;
      height: 0.88rem;
      line-height: 0.88rem;
      display: flex;
    }
  }
  .blank {
    width: 100%;
    height: 0.88rem;
  }
  .disableSelection {
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -khtml-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -o-user-select: none;
    pointer-events: none;
  }

  .doubleLines {
    display: block;
    height: 0.44rem;
    line-height: 0.44rem;
  }
}
</style>

